Understanding ECMAScript 6 - Search